package cn.kgc.spring.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author 课工场
 * @date 2024/4/27
 * @description
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component("stu")  // 通过注解属性  设置存储当前对象的key
public class Student {

    @Value("${student.name}")
    private String name;
    @Value("${student.id}")
    private Integer id;
    @Value("${student.height}")
    private Double height;

    @Value("2024/04/28")
    private Date birth;

}
